package com.ajie.service.impl;

import com.ajie.entity.vo.RoleAuthority;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.ajie.entity.SysRole;
import com.ajie.mapper.SysRoleMapper;
import com.ajie.service.SysRoleService;

import java.util.List;

/**
 * 角色表;(sys_role)表服务实现类
 * @author: ajie
 * @date : 2024-7-7
 */
@Service
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements SysRoleService {

    @Override
    public List<String> getPermissions(String roleId) {
        return baseMapper.getPermissions(roleId);
    }

    @Override
    public boolean check(RoleAuthority authority) {
        baseMapper.deleteCheck(authority);
        return baseMapper.insertCheck(authority);
    }
}